//
//  CaculatorMaker.m
//  Objective-C
//
//  Created by 陆承东 on 2018/11/9.
//  Copyright © 2018 S_Line. All rights reserved.
//

#import "CalculatorMaker.h"

@implementation CalculatorMaker

- (CalculatorMaker *(^)(CGFloat))add {
    return ^CalculatorMaker *(CGFloat value) {
        self->_result += value;
        return self;
    };
}

- (CalculatorMaker *(^)(CGFloat))sub {
    return ^CalculatorMaker *(CGFloat value) {
        self->_result -= value;
        return self;
    };
}

- (CalculatorMaker *(^)(CGFloat))multi {
    return ^CalculatorMaker *(CGFloat value) {
        self->_result *= value;
        return self;
    };
}

- (CalculatorMaker *(^)(CGFloat))divide {
    return ^CalculatorMaker *(CGFloat value) {
        self->_result /= value;
        return self;
    };
}

@end
